package com.aimei.www.modules.ss.controller;

import com.aimei.www.modules.exception.AimeiException;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/a")
public class ExceptionController {
       @RequestMapping("/b")
       public String test(String m) {
              if(m!=null){
                     throw new AimeiException(m);
              }else{
                     return m.toString();
              }

       }

       @RequestMapping("/c")
       public String tt(String m) throws Throwable{
              if(m!=null){
                      //new AimeiScopException("HAVE_NO_RIGHT");
                      return  "";
              }else{
                     return m.toString();
              }

       }
}
